package com.michau.testitas.common.model.definition;

import com.michau.testitas.common.model.BaseEntity;

import javax.persistence.*;

/**
 * User: michau
 * Date: 1/8/13
 * Time: 7:23 PM
 */
@Entity
@Table(name = "testit_definition")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "definition_type")
public abstract class Definition<T> extends BaseEntity{

    @Version
    @Column(name = "version", nullable = false)
    private long version;

    @Column(name = "title", nullable = false)
    private String title;

    public abstract T getContent();

    public abstract void setContent(T content);

}